package com.ryder.subject.domain.convert;

import com.ryder.subject.domain.entity.SubjectInfoBO;
import com.ryder.subject.domain.entity.SubjectOptionBO;
import com.ryder.subject.infra.basic.entity.SubjectInfo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 描述: 题目BO转换
 *
 * @author Ryder
 * @version 1.0
 * @since 1.0 // 版本号，指明从哪个版本开始
 * 更新日期: 2025/02/05
 */

@Mapper
public interface SubjectInfoConvert {

    SubjectInfoConvert INSTANCE = Mappers.getMapper(SubjectInfoConvert.class);
    // BO转实体
    SubjectInfo convertBoToInfo(SubjectInfoBO subjectInfoBO);
    // 实体转BO
    SubjectInfoBO convertOptionToBo(SubjectOptionBO subjectOptionBO);
    // 实体转BO
    SubjectInfoBO convertOptionAndInfoToBo(SubjectOptionBO subjectOptionBO, SubjectInfo subjectInfo);
    // 实体列表转BO列表
    List<SubjectInfoBO> convertInfoToBoList(List<SubjectInfo> subjectInfoList);

}
